<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>ng-selected、ng-disabled实例讲解</title>
	<script src="../org/angular.min.js"></script>
	</head>
	<body>
	    <div ng-app="hd" ng-controller="ctrl">
	    	<select ng-model="user.sex">
	    		<option value="">请选择</option>
	    	 	<option ng-selected="user.sex==1" ng-value="1">男</option>  // ng-selected=true选中当前项
	    	    <option ng-selected="user.sex==2" ng-value="2">女</option>
	    	</select>
	    	<input type="radio" ng-model="user.sex" ng-value="1" />男       <!--点击此选项时，会给自动给$scope复制上user，有sex且值为1-->
	    	<input type="radio" ng-model="user.sex" ng-value="2" />女
	    	
	    	
	        </br>
	        </br>	
	    	<label><input ng-value="copyRight" type="checkbox" ng-click="copyRight=!copyRight" />接受此协议</label>
	    	<input type="submit" ng-disabled="!copyRight" value="登录" />
	    	
	    	
	    	</br>
	    	</br>
	    </div>
	    <script>
	    	var m = angular.module('hd',[]);
	    	m.controller('ctrl',['$scope',function($scope){
	    		 
	    	}]);
	    </script>
	</body>
</html>
